package com.fub.update;

public class BuildingUpdate {
	private String buildingId;
	private int version;
	private float latitude;
	private float longitude;
	private UpdateType updateType;

	/**
	 * Constructs a new building update.
	 * 
	 * @param buildingId
	 *            the id of this building
	 * @param version
	 *            the version number of this update
	 * @param updateType
	 *            the type of this update
	 */
	public BuildingUpdate(String buildingId, int version,
			UpdateType updateType, float latitude, float longitude) {
		this.buildingId = buildingId;
		this.version = version;
		this.updateType = updateType;
		this.latitude = latitude;
		this.longitude = longitude;
	}

	/**
	 * Returns the latitude of the building.
	 * 
	 * @return the latitude of the building
	 */
	public float getLatitude() {
		return this.latitude;
	}

	/**
	 * Returns the longitude of the building.
	 * 
	 * @return the longitude of the building
	 */
	public float getLongitude() {
		return this.longitude;
	}

	/**
	 * Returns the id of the building.
	 * 
	 * @return the id of the building
	 */
	public String getBuildingId() {
		return this.buildingId;
	}

	/**
	 * Returns the version of this building update.
	 * 
	 * @return the version of this building update
	 */
	public int getVersion() {
		return this.version;
	}

	/**
	 * Return the type of this building update.
	 * 
	 * @return the type of this building update
	 */
	public UpdateType getType() {
		return this.updateType;
	}

	/**
	 * Sets the id of the building.
	 * 
	 * @param buildingId
	 *            the id of the building
	 */
	public void setBuildingId(String buildingId) {
		this.buildingId = buildingId;
	}

	/**
	 * Sets the version of this building update.
	 * 
	 * @param version
	 *            the version of this building update
	 */
	public void setVersion(int version) {
		this.version = version;
	}

	/**
	 * Sets the type of this building update.
	 * 
	 * @param updateType
	 *            the type of this building update
	 */
	public void setUpdateType(UpdateType updateType) {
		this.updateType = updateType;
	}

	public static enum UpdateType {
		BUILDING_NEW, BUILDING_UPDATE;
	}
}
